package org.demo.cnck.controller.vm;


public interface HttpMessage {
    int CODE_OK = 200;
    int CODE_BAD_REQUEST = 400;
    int CODE_UNAUTHORIZED = 401;
    int CODE_LOGIN_FAILED = 402;
    int CODE_INTERNAL_SERVER_ERROR = 500;

    enum ZoneStatus {
        OK(CODE_OK),
        BAD_REQUEST(CODE_BAD_REQUEST),
        UNAUTHORIZED(CODE_UNAUTHORIZED),
        LOGIN_FAILED(CODE_LOGIN_FAILED),
        INTERNAL_SERVER_ERROR(CODE_INTERNAL_SERVER_ERROR);
        Integer code;

        ZoneStatus(int code) {
            this.code = code;
        }

        public int getCode() {
            return code;
        }

        @Override
        public String toString() {
            return code.toString();
        }
    }

    int getCode();

    String getMessage();

}
